import { post } from "../../../utils/request";
const env = import.meta.env;

const apiUploadDemo = {
  list() {
    return post(
      env.VITE_API_ADMIN_CONTEXT_PATH + "/admin/api/upload.demo.listing",
      null
    );
  },
  get(id: string) {
    return post(
      env.VITE_API_ADMIN_CONTEXT_PATH + "/admin/api/upload.demo.get",
      {
        id,
      }
    );
  },
  save(data: any) {
    return post(
      env.VITE_API_ADMIN_CONTEXT_PATH + "/admin/api/upload.demo",
      data
    );
  },
  delete(id: string) {
    return post(
      env.VITE_API_ADMIN_CONTEXT_PATH +
        "/admin/api/upload.demo.delete?id=" +
        id,
      null
    );
  },
};

export default apiUploadDemo;
